<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.infodms.dms.common.Constant"%>
<%
String contextPath = request.getContextPath();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="${contextPath}/common/jsp_head_new.jsp" />
<title>车型组维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<div class="navigation">
  <img src="<%=contextPath%>/img/nav.gif" />&nbsp;当前位置： 售后服务管理&gt;索赔基本数据&gt;车型组维护</div>
<form name='fm' id='fm'>
<table class="table_add">
 <tr>
 	<td class="table_add_2Col_label_5Letter">车型组类型：</td>
 	<td>
 	  <script type="text/javascript">
	     genSelBoxExp("WRGROUP_TYPE",<%=Constant.WR_MODEL_GROUP_TYPE%>,"",false,"short_sel","","false",'');
	   </script>
 	</td>
 </tr>
 <tr>
 	<td class="table_add_2Col_label_5Letter">车型组代码：</td>
 	<td><input type="text" name="WRGROUP_CODE" id="WRGROUP_CODE" class="middle_txt" datatype="0,is_null,20"/></td>
 </tr> 
 <tr>
 	<td class="table_add_2Col_label_5Letter">车型组名称：</td>
 	<td>
 	    <input type="text" name="WRGROUP_NAME" id="WRGROUP_NAME" class="middle_txt" datatype="0,is_null,20"/>
 	</td>
 </tr>
</table>

<table class="table_edit" >
 <tr>
 	<td colspan="2" align="center">
 		<input class="normal_btn" type="button" name="ok" value="新增" onclick="checkForm('<%=contextPath%>/claim/basicData/ClaimModelMain/claimModelAdd.json');"/> 
 		<input class="normal_btn" name="back" type="button" onclick="JavaScript:history.back();" value="返回"/>
 	</td>
 </tr>
</table>

</form>
<script>
//表单提交前的验证：
function checkForm(url){
	submitForm('fm') == true ? Add(url) : "";
}
//表单提交方法：
function Add(url){
	makeNomalFormCall(url,addBack,'fm','');
}
//回调方法：
function addBack(json) {
	if(json.error != null && json.error.length > 0){
		MyAlert("车型组代码:["+json.error+"]系统已存在，请重新输入");
	}else if(json.success != null && json.success=='true'){
		MyAlertForFun("新增成功",sendPage);
	}else{
		MyAlert("新增失败！请联系管理员");
	}
}
//页面跳转
function sendPage(){
	window.location = '<%=contextPath%>/claim/basicData/ClaimModelMain/claimModelInit.do';
} 
</script>
</body>
</html>
